def print_file_info(file_name):
    f=None
    try:
        f=open(file_name,'r',encoding='utf-8')
        lines=f.readlines()
        for line in lines:
            print(line.strip())
    except FileNotFoundError:
        print(f"文件{file_name}不存在")
    finally:
        if f!=None:
            f.close()

def append_to_file(file_name,data):
    f=open(file_name,'a',encoding='utf-8')
    try:
        f.write(data)
        f.flush()
    finally:
        f.close()